﻿namespace Sidvall.WorkItemManager.Data.Keys
{
    public class WorkItemWorkConditionKey
    {
        public long WorkConditionId { get; set; }
        public long WorkItemId { get; set; }
        
        public static WorkItemWorkConditionKey GetKey(IWorkItemWorkCondition item)
        {
            if (item == null)
                return null;
            return new WorkItemWorkConditionKey()
            {
                WorkConditionId = item.WorkConditionId,
                WorkItemId = item.WorkItemId,
            };
        }
        public static WorkItemWorkConditionKey GetKey(long workConditionId, long workItemId)
        {
            return new WorkItemWorkConditionKey()
            {
                WorkConditionId = workConditionId,
                WorkItemId = workItemId,
            };
        }
    }
}